Grant
Kennedy
Nixon
Bush
Grant
Kennedy
Nixon
Bush
The research presented in this document does not represent the official views of the Army. The opinions and findings expressed herein are solely those of the authors or contributors and do not reflect Army policy or endorsement.
Why are you at Baylor and why are you trying to answer this question…?
Dr David Kahle
Author of {ggmap}, {mpoly}, {algstat}, {latter}, {m2r}, {bertini}
Dr (COL R) Rodney Sturdivant
Applied Logistic Regression
Associate Professor and Director of the Statistical Consulting Center
Are leaders with military
experience more likely to
lead their countries in war?
Those with listed experience
Those without listed experience
Statistics
R
Real World Question
Statistics
\(\log\left(\frac{p}{1-p}\right) = \beta_0 + \beta_1X_1 + \beta_2X_2 + \ldots + \beta_kX_k\)
Statistics
R
Real World Question
R
Statistics
R
Real World Question
Real World Question
Real World Question
Statistics
R
Real World Question
Univariable Analysis
Initial Multivariable Model
Compare Models
Preliminary Main Effects Model
Main Effects Model
Preliminary Final Model
Adequacy and Model Fit
univariable <- function(factor) {
formula <- str_c("cwinit", "~", factor)
glm(formula, data = data, family = binomial(link = "logit")) |>
broom::tidy() |>
select(term, estimate, p.value) |>
filter(term != "(Intercept)")
}| term | estimate | p.value | odds |
|---|---|---|---|
| monadicleaderrisk | 6.52 | 0.00 | 675.98 |
| year | −0.01 | <0.01 | 0.99 |
| syscon | 9.72 | <0.01 | 16,591.53 |
| leadernoinit | −0.20 | <0.01 | 0.82 |
| defpact | 1.13 | <0.01 | 3.10 |
| satisdy | 1.63 | <0.01 | 5.09 |
| warwin | 0.89 | <0.01 | 2.44 |
| rebelloss | 1.21 | <0.01 | 3.34 |
| leadernoinit2 | −0.01 | <0.01 | 0.99 |
| countryrandom | 0.49 | <0.01 | 1.64 |
| leaderpeaceyrs1 | <0.01 | <0.01 | 1.00 |
| combat | 0.48 | <0.01 | 1.62 |
| leaderpeaceyrs2 | <0.01 | <0.01 | 1.00 |
| cwpceyrs1 | <0.01 | <0.01 | 1.00 |
| leaderpeaceyrs3 | <0.01 | <0.01 | 1.00 |
| leadernoinit3 | 0.00 | <0.01 | 1.00 |
| sideabof | 0.53 | <0.01 | 1.70 |
| cwpceyrs2 | <0.01 | <0.01 | 1.00 |
| rebel | 0.33 | <0.01 | 1.39 |
| cwpceyrs3 | <0.01 | <0.01 | 1.00 |
| rebelwin | 0.46 | <0.01 | 1.58 |
| careerpolitician | −0.32 | <0.01 | 0.73 |
| religion | 0.74 | <0.01 | 2.10 |
| age | 0.01 | <0.01 | 1.01 |
| warloss | 0.40 | <0.01 | 1.49 |
| marriedinpower | −0.38 | <0.01 | 0.69 |
| business | −0.44 | <0.01 | 0.64 |
| medicine | −0.87 | <0.01 | 0.42 |
| militarycareer | 0.24 | <0.01 | 1.27 |
| milnoncombat | 0.30 | <0.01 | 1.35 |
| polity21 | −0.01 | <0.01 | 0.99 |
| numGPs | 0.08 | <0.01 | 1.09 |
| divorced | −0.24 | <0.01 | 0.79 |
| teacher | 0.19 | <0.01 | 1.21 |
| parstability | 0.25 | <0.01 | 1.28 |
| totalspouses | −0.06 | <0.01 | 0.94 |
| dem1 | −0.15 | <0.01 | 0.86 |
| demlow | −0.01 | <0.01 | 0.99 |
| married | −0.31 | <0.01 | 0.74 |
| jointdem | −0.25 | <0.01 | 0.78 |
| activist | 0.14 | <0.01 | 1.15 |
| illegit | −0.36 | <0.01 | 0.70 |
| childtotal | −0.01 | 0.03 | 0.99 |
| leveledu | −0.05 | 0.03 | 0.95 |
| gender | 0.34 | 0.07 | 1.41 |
| aristocratlandowner | −0.14 | 0.07 | 0.87 |
| dem2 | 0.06 | 0.17 | 1.07 |
| law | −0.07 | 0.19 | 0.93 |
| police | −0.26 | 0.26 | 0.77 |
| orphanbinary | −0.14 | 0.28 | 0.87 |
| officetenure1000 | −0.01 | 0.41 | 0.99 |
| bluecollar | −0.04 | 0.50 | 0.96 |
| royalty | −0.04 | 0.52 | 0.96 |
| scienceeng | 0.04 | 0.70 | 1.04 |
| fatalmid | 22.13 | 0.77 | 4,077,739,297.16 |
| demhigh | <0.01 | 0.78 | 1.00 |
| force2dv | 23.28 | 0.81 | 12,894,882,352.48 |
| random | <0.01 | 0.85 | 1.01 |
| dyadid | <0.01 | 0.96 | 1.00 |
| journalism | <0.01 | 0.99 | 1.00 |
| creative | 0.00 | 1.00 | 1.00 |
| term | log_odds | odds_ratio | p.value |
|---|---|---|---|
| (Intercept) | −3.71 | 0.02 | <0.01 |
| log_yearssincemidinit | −1.16 | 0.31 | <0.01 |
| illegit1 | −0.56 | 0.57 | <0.01 |
| medicine1 | −0.45 | 0.64 | 0.07 |
| royalty1 | −0.36 | 0.69 | <0.01 |
| militarycareer1 | −0.26 | 0.77 | 0.09 |
| age | 0.01 | 1.01 | 0.02 |
| officetenure1000 | 0.03 | 1.03 | 0.03 |
| parstability1 | 0.32 | 1.37 | 0.08 |
| yearssincemidinit | 0.35 | 1.42 | <0.01 |
| combat1 | 0.54 | 1.71 | <0.01 |
| creative1 | 0.56 | 1.74 | 0.04 |
| rebelloss1 | 0.68 | 1.97 | <0.01 |
| milnoncombat1 | 0.70 | 2.01 | <0.01 |
| Leader | Risk | To_War |
|---|---|---|
| Ronald Reagan | 0.74 | Yes |
| Gerald Ford | 0.59 | Yes |
| John F. Kennedy | 0.58 | Yes |
| Theodore Roosevelt | 0.56 | Yes |
| Bush | 0.54 | Yes |
| Cleveland | 0.21 | No |
| Roosevelt, F. | 0.21 | Yes |
| Coolidge | 0.20 | No |
| Hoover | 0.19 | No |
| Cleveland | 0.17 | No |
| Leader | Risk | To_War |
|---|---|---|
| John F. Kennedy | 0.58 | Yes |
| Adolf Hitler | 0.57 | Yes |
| Nixon | 0.52 | Yes |
| G.W. Bush | 0.39 | No |
| Grant | 0.36 | Yes |
| Mandela | 0.28 | No |
explain what some of these are
\(\eqn{\mathrm{dr} \quad dr_i}{dr}\)
remove some univariable analysis factors
rework actual final model – maybe do not include combat or milnoncombat
create visual to show effect of combat
have closing slide